
import 'dart:ui';

import 'package:flutter/material.dart';
import 'package:gluz/app_session.dart';

extension AppDevice on AppSession {
  double getStatusBarHeight() {
    return MediaQueryData.fromView(
        PlatformDispatcher.instance.views.first
    ).padding.top;
  }

  double getBottomSafeAreaHeight() {
    final view = PlatformDispatcher.instance.views.first;
    return view.padding.bottom;
  }

  String getAppVersion() {
    return packageInfo.version;
  }

  int getAppBuildNumber() {
    return int.parse(packageInfo.buildNumber);
  }
}